Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add SlideInfoBase.frontmatterRaw #1268

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Conversation

KermanX
Copy link
Member

@KermanX KermanX commented Feb 3, 2024

This PR adds the SlideInfoBase.frontmatterRaw field, which is used to preserve comments in frontmatter for the Prettier plugin for Slidev. (See #1261 (comment))

 export interface SlideInfoBase {
   raw: string
   content: string
   note?: string
   frontmatter: Record<string, any>
+  frontmatterRaw?: string
   frontmatterStyle?: FrontmatterStyle
   title?: string
   level?: number
 }

frontmatterRaw stores only the YAML part of frontmatter.

@KermanX KermanX mentioned this pull request Feb 3, 2024
@antfu antfu changed the title Add SlideInfoBase.frontmatterRaw feat: add SlideInfoBase.frontmatterRaw Feb 3, 2024
@antfu antfu merged commit ee4fc84 into slidevjs:main Feb 3, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants